import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from "./router";
import Vuex from 'vuex';
import axios from 'axios'
import AdminLayout from "@/layouts/AdminLayout";
const app = createApp(App)
app.use(router)
app.use(ElementPlus)
app.use(Vuex)
app.component(AdminLayout.name, AdminLayout,)
app.mount('#app')



axios.interceptors.request.use(  config => {
    if (localStorage.getItem('Authorization'))
    {
        config.headers.Authorization = localStorage.getItem('Authorization');
    }
    return config;  },
error => {    return Promise.reject(error);
});
